//
// Created by user on 2022/1/19.
//
#include <vector>

using namespace std;
void rotate(vector<vector<int>>& matrix) {
    int n = matrix.size();
    int m = matrix[0].size();
    //奇数偶数问题，
    for (int i = 0; i < n/2; ++i) {
        for (int j = 0; j < (m+1)/2; ++j) {
            int temp = matrix[i][j];
            matrix[i][j] = matrix[m-j-1][i];
            matrix[m-j-1][i] = matrix[n-i-1][m-j-1];
            matrix[n-i-1][m-j-1] = matrix[j][m-i-1];
            matrix[j][m-i-1] = temp;
        }
    }

}